﻿using System;
using System.Collections.Generic;

namespace Model
{
     ///<summary>
     ///实体类TABLE_UNION_NAME
     ///</summary>
     public class TABLE_UNION_NAME
     {
         private int __ID=0 ;
         private string __TABLE_NAME=string.Empty ;
         private string __TABLE_CONST=string.Empty ;
         private int? __TABLE_TYPE=null ;

         private Dictionary<string, bool> __Changed = new Dictionary<string, bool>();


         public TABLE_UNION_NAME()
         {
             this.__Changed.Add("ID",false);
             this.__Changed.Add("TABLE_NAME",false);
             this.__Changed.Add("TABLE_CONST",false);
             this.__Changed.Add("TABLE_TYPE",false);
         }

         /// <summary>
         /// 将类重置到初始化状态
         /// </summary>
         public void Reset()
         {
             this.__ID =0;
             this.__TABLE_NAME =string.Empty;
             this.__TABLE_CONST =string.Empty;
             this.__TABLE_TYPE =null;
             this.__Changed["ID"] = false;
             this.__Changed["TABLE_NAME"] = false;
             this.__Changed["TABLE_CONST"] = false;
             this.__Changed["TABLE_TYPE"] = false;
         }

         /// <summary>
         /// 获取类中成员的改变状态
         /// </summary>
         public bool Changed(string strKey)
         {
             return __Changed[strKey];
         }

         /// <summary>
         ///设置或获取类中的[ID]的数据
         /// </summary>
         public int ID
         {
              set{ __ID = value; __Changed["ID"] = true;}
              get{return __ID;}
         }
         /// <summary>
         ///设置或获取类中的[TABLE_NAME]的数据
         /// </summary>
         public string TABLE_NAME
         {
              set{ __TABLE_NAME = value.Replace("'","’"); __Changed["TABLE_NAME"] = true;}
              get{return __TABLE_NAME;}
         }
         /// <summary>
         ///设置或获取类中的[TABLE_CONST]的数据
         /// </summary>
         public string TABLE_CONST
         {
              set{ __TABLE_CONST = value.Replace("'","’"); __Changed["TABLE_CONST"] = true;}
              get{return __TABLE_CONST;}
         }
         /// <summary>
         ///设置或获取类中的[TABLE_TYPE]的数据
         /// </summary>
         public int? TABLE_TYPE
         {
              set{ __TABLE_TYPE = value; __Changed["TABLE_TYPE"] = true;}
              get{return __TABLE_TYPE;}
         }
    }
}
